#ifndef SHAMROCKET_HPP_INCLUDED
#define SHAMROCKET_HPP_INCLUDED

#include <SFML/Graphics.hpp>

#include "../game_state.hpp"
#include "../singleton.hpp"

struct Shammer {
	sf::Sprite gauge;
	sf::Sprite gaugeCursor;
	
	sf::Sprite pad;
	sf::Vector2f rocketSpeed;
	
	sf::Sprite rocket;
	sf::Sprite reactor;
	float reactorTime;
	int reactorFrame;
	bool rocketLaunched;
	float score;
	int scoreMove;
	float scale, scaleSpeed;
	bool won;
};

class ShamRocket: public GameState, public Singleton<ShamRocket> {
	friend class Singleton<ShamRocket>;
	public:
		void init(Engine *engine);
		void cleanup();
		
		void pause();
		void resume();
		
		void processEvent(Engine *engine, PlayerEvent& event);
		void update(Engine *engine);
		void draw(Engine *engine);
		
		float countdown;
		sf::String countdownString;
		int remaining;
		
		float quitTime;
		
		sf::Shape background;
		sf::Sprite stars;
		sf::Sprite scene;
		std::map<int, Shammer> shammers;
		std::map<float, Shammer*> shammerZs;
		sf::Clock clock;
	protected:
		ShamRocket();
		~ShamRocket();
};

#endif // SHAMROCKET_HPP_INCLUDED
